-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some more media sites #96
Conversation
Signed-off-by: Matt Friedman <maf675@gmail.com>
Signed-off-by: Matt Friedman <maf675@gmail.com>
Signed-off-by: Matt Friedman <maf675@gmail.com>
Signed-off-by: Matt Friedman <maf675@gmail.com>
collection/sites/mastodon.yml
Outdated
oembed: | ||
endpoint: https://mastodon.social/api/oembed | ||
scheme: https://mastodon.social/@{@name}/{@id} | ||
scrape: | ||
- extract: | ||
url: "!https://(?'host'[-.\\w]+)/@(?'name'\\w+)/(?'id'\\d+)!" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JoshyPHP could you please judge if this part of definition is fully correct, especially the imported part of extract
which looks like 'extract'=>['#"url":"https://(?\'host\'[-.\\w]+)/@(?\'name\'\\w+)/(?\'id\'\\d+)"#']
in CachedDefinitionCollection.php
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At first glance it looked fine but on a second read I realized it was a trick of the eye caused by the YML structure. The regexp I use is #"url":"https://(?'host'[-.\w]+)/@(?'name'\w+)/(?'id'\d+)"#
. That code looks like it creates a url
attribute inside the extract
definition.
I should mention that CachedDefinitionCollection.php
is auto-generated from XML files. The XML files are canonical and human-readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So... Like the way I just updated it is how it should be?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That looks like it. If there's anything wrong with it, I can't see it.
Signed-off-by: Matt Friedman <maf675@gmail.com>
Well, regional issue would be the case for Bilibili but example link loads fine directly in the browser. Also the site works on my side in common. Weird. |
Yeah I don't know. I've tried in all 4 browsers and they work here (Edge, Firefox, Chrome and Safari) |
No description provided.